﻿@model IList<RBS.Web.Hotel.Models.Dine.CookDishViewModel>

@{
    ViewBag.Title = "";
    Layout = "~/Views/Shared/_Layout.cshtml";

}


<!--导航栏-->
@{
    @Html.Partial("_Location");
}
<!--/导航栏-->
<!--工具栏-->
@*<div class="toolbar-wrap">
    <div id="floatHead" class="toolbar">
        <div class="l-list">
            
        </div>
        <div class="r-list">
            
        </div>
    </div>
</div>*@
<!--/工具栏-->

<div id="divOrderDishContainer">
    <center>
        <img src="~/Content/Images/onLoading.gif" />
    </center>
</div>

<script type="text/javascript">

    $(function () {
        loadData();
        //setInterval(loadData, 5000);
    })

    //加载数据
    var loadData = function () {
        var model = { pageIndex: 1 };
        $.post("/Dine/_OrderDishList", model, function (data) {
            $("#divOrderDishContainer").html('');
            $("#divOrderDishContainer").html(data);
        })
    }

    var speedDish = function (id) {
        $.post("/Dine/SpeedDish", { id: id }, function (data) {
            if (data.IsSuccess) {
                $.dialog.alert("催菜成功！");
                loadData();
            } else {
                $.dialog.alert("催菜失败！");
            }
        })
    }

</script>
